package com.cattsoft.ssm.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.cattsoft.ssm.component.FindComponent;

import com.cattsoft.ssm.entity.User;

public class FindServiceImpl implements FindService{
	private FindComponent findComponent;
	public  User findUserById(int id){
		ApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
		findComponent = (FindComponent)ctx.getBean("findComponent");
		return findComponent.findUserById(id);
		
	}
	public FindComponent getFindComponent() {
		return findComponent;
	}
	public void setFindComponent(FindComponent findComponent) {
		this.findComponent = findComponent;
	}
	
	
}
